package com.hydl.power.mapper;

import com.hydl.power.pojo.Gateway;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GatewayMapper {
    /*查询所有网关*/
    List<Gateway> queryGatewayAll();
    /*删除指定网关*/
    int deleteGatewayById(Integer id);
    /*添加网关*/
    int addGateway(Gateway gateway);
    /*根据网关编码查询网关*/
    Gateway queryGatewayById(String gatewaySn);
    /*按照条件查询网关*/
    List<Gateway> queryByCityId(@Param("pageNumKey") Integer pageNum, @Param("pageSizeKey") Integer pageSize,String cityId,String projectId,String roomId);

    List<Gateway> queryByTokenId(@Param("pageNumKey") Integer pageNum, @Param("pageSizeKey") Integer pageSize,String cityId,String projectId,String roomId,String token);
    /*根据配电房id查询网关*/
    List<Gateway> queryGatewayByPowerId(String roomId);

    List<String> selectGateWaySn();

    /*模糊查询*/
    List<Gateway> queryGatewayLike(@Param("pageNumKey") Integer pageNum, @Param("pageSizeKey") Integer pageSize,String text,String projectId);

    int updateGatewayStatus(Integer id,Integer status);

    List<Gateway> getGatewayByBrand(Integer brand);
}
